package com.cyx.dao;

import com.cyx.entity.SuccessKilled;
import com.cyx.entity.SuccessKilledMultiKeyClass;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;


public interface SuccessKilledMapper extends JpaRepository<SuccessKilled,SuccessKilledMultiKeyClass> {
    @Modifying
    @Transactional
    @Query(value = "insert into success_killed(seckill_id,user_phone) values(?1,?2)" ,nativeQuery = true)
    int insertSuccessKilled(long seckillId,long phoneNum);


}
